3.4.12 \(\int (a+b x^n)^p (c+d x^n)^q \, dx\) [312]

Optimal. Leaf size=81 \[ x \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \left (c+d x^n\right )^q \left (1+\frac {d x^n}{c}\right )^{-q} F_1\left (\frac {1}{n};-p,-q;1+\frac {1}{n};-\frac {b x^n}{a},-\frac {d x^n}{c}\right ) \]

[Out]

x*(a+b*x^n)^p*(c+d*x^n)^q*AppellF1(1/n,-p,-q,1+1/n,-b*x^n/a,-d*x^n/c)/((1+b*x^n/a)^p)/((1+d*x^n/c)^q)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 81, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {441, 440} \begin {gather*} x \left (a+b x^n\right )^p \left (\frac {b x^n}{a}+1\right )^{-p} \left (c+d x^n\right )^q \left (\frac {d x^n}{c}+1\right )^{-q} F_1\left (\frac {1}{n};-p,-q;1+\frac {1}{n};-\frac {b x^n}{a},-\frac {d x^n}{c}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*x^n)^p*(c + d*x^n)^q,x]

[Out]

(x*(a + b*x^n)^p*(c + d*x^n)^q*AppellF1[n^(-1), -p, -q, 1 + n^(-1), -((b*x^n)/a), -((d*x^n)/c)])/((1 + (b*x^n)
/a)^p*(1 + (d*x^n)/c)^q)

Rule 440

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Simp[a^p*c^q*x*AppellF1[1/n, -p,
 -q, 1 + 1/n, (-b)*(x^n/a), (-d)*(x^n/c)], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n
, -1] && (IntegerQ[p] || GtQ[a, 0]) && (IntegerQ[q] || GtQ[c, 0])

Rule 441

Int[((a_) + (b_.)*(x_)^(n_))^(p_)*((c_) + (d_.)*(x_)^(n_))^(q_), x_Symbol] :> Dist[a^IntPart[p]*((a + b*x^n)^F
racPart[p]/(1 + b*(x^n/a))^FracPart[p]), Int[(1 + b*(x^n/a))^p*(c + d*x^n)^q, x], x] /; FreeQ[{a, b, c, d, n,
p, q}, x] && NeQ[b*c - a*d, 0] && NeQ[n, -1] &&  !(IntegerQ[p] || GtQ[a, 0])

Rubi steps

\begin {align*} \int \left (a+b x^n\right )^p \left (c+d x^n\right )^q \, dx &=\left (\left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p}\right ) \int \left (1+\frac {b x^n}{a}\right )^p \left (c+d x^n\right )^q \, dx\\ &=\left (\left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \left (c+d x^n\right )^q \left (1+\frac {d x^n}{c}\right )^{-q}\right ) \int \left (1+\frac {b x^n}{a}\right )^p \left (1+\frac {d x^n}{c}\right )^q \, dx\\ &=x \left (a+b x^n\right )^p \left (1+\frac {b x^n}{a}\right )^{-p} \left (c+d x^n\right )^q \left (1+\frac {d x^n}{c}\right )^{-q} F_1\left (\frac {1}{n};-p,-q;1+\frac {1}{n};-\frac {b x^n}{a},-\frac {d x^n}{c}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(190\) vs. \(2(81)=162\).
time = 0.30, size = 190, normalized size = 2.35 \begin {gather*} \frac {a c (1+n) x \left (a+b x^n\right )^p \left (c+d x^n\right )^q F_1\left (\frac {1}{n};-p,-q;1+\frac {1}{n};-\frac {b x^n}{a},-\frac {d x^n}{c}\right )}{b c n p x^n F_1\left (1+\frac {1}{n};1-p,-q;2+\frac {1}{n};-\frac {b x^n}{a},-\frac {d x^n}{c}\right )+a d n q x^n F_1\left (1+\frac {1}{n};-p,1-q;2+\frac {1}{n};-\frac {b x^n}{a},-\frac {d x^n}{c}\right )+a c (1+n) F_1\left (\frac {1}{n};-p,-q;1+\frac {1}{n};-\frac {b x^n}{a},-\frac {d x^n}{c}\right )} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*x^n)^p*(c + d*x^n)^q,x]

[Out]

(a*c*(1 + n)*x*(a + b*x^n)^p*(c + d*x^n)^q*AppellF1[n^(-1), -p, -q, 1 + n^(-1), -((b*x^n)/a), -((d*x^n)/c)])/(
b*c*n*p*x^n*AppellF1[1 + n^(-1), 1 - p, -q, 2 + n^(-1), -((b*x^n)/a), -((d*x^n)/c)] + a*d*n*q*x^n*AppellF1[1 +
 n^(-1), -p, 1 - q, 2 + n^(-1), -((b*x^n)/a), -((d*x^n)/c)] + a*c*(1 + n)*AppellF1[n^(-1), -p, -q, 1 + n^(-1),
 -((b*x^n)/a), -((d*x^n)/c)])

________________________________________________________________________________________

Maple [F]
time = 0.12, size = 0, normalized size = 0.00 \[\int \left (a +b \,x^{n}\right )^{p} \left (c +d \,x^{n}\right )^{q}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*x^n)^p*(c+d*x^n)^q,x)

[Out]

int((a+b*x^n)^p*(c+d*x^n)^q,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^p*(c+d*x^n)^q,x, algorithm="maxima")

[Out]

integrate((b*x^n + a)^p*(d*x^n + c)^q, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^p*(c+d*x^n)^q,x, algorithm="fricas")

[Out]

integral((b*x^n + a)^p*(d*x^n + c)^q, x)

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: HeuristicGCDFailed} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x**n)**p*(c+d*x**n)**q,x)

[Out]

Exception raised: HeuristicGCDFailed >> no luck

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*x^n)^p*(c+d*x^n)^q,x, algorithm="giac")

[Out]

integrate((b*x^n + a)^p*(d*x^n + c)^q, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (a+b\,x^n\right )}^p\,{\left (c+d\,x^n\right )}^q \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*x^n)^p*(c + d*x^n)^q,x)

[Out]

int((a + b*x^n)^p*(c + d*x^n)^q, x)

________________________________________________________________________________________